package com.chee.plant.server;

import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

public class MessageCodecFactory implements ProtocolCodecFactory  {
	private final ProtocolEncoder _encoder;
    private final ProtocolDecoder _decoder;
    
    public MessageCodecFactory(){
    	this._encoder = new MessageEncoder();
    	this._decoder = new MessageDecoder();
    }
	@Override
	public ProtocolDecoder getDecoder() throws Exception {
		return this._decoder;
	}

	@Override
	public ProtocolEncoder getEncoder() throws Exception {
		return this._encoder;
	}

}
